﻿using System.Web;
using System.Web.UI;
using System.Text;
/// <summary>
/// Descripción breve de Alert
/// </summary>
public static class Alert
{
    public static void Show(string Message)
    {
        string cleanMessage =Message.Replace("'","\'");
        string script = "<script type=\"text/javascript\"> alert(\""+cleanMessage+"\");</script>";
        Page page = HttpContext.Current.CurrentHandler as Page;

        if (page != null && !page.ClientScript.IsClientScriptBlockRegistered("alert"))
        {
            page.ClientScript.RegisterClientScriptBlock(typeof(Alert),"alert",script);
        }

    }
}
